﻿Type=Activity
Version=5.8
ModulesStructureVersion=1
B4A=true
@EndOfDesignText@
#Region  Activity Attributes 
	#FullScreen: False
	#IncludeTitle: True
#End Region

Sub Process_Globals
	'These global variables will be declared once when the application starts.
	'These variables can be accessed from all modules.

End Sub

Sub Globals
	'These global variables will be redeclared each time the activity is created.
	'These variables can only be accessed from this module.
	
	Private cblv As ClsCheckList
	Private pab As Panel
	Private ab As ClsActionBar
	Private svcblv As ScrollView
End Sub

Sub Activity_Create(FirstTime As Boolean)
	'Do not forget to load the layout file created with the visual designer. For example:
	Activity.LoadLayout("layaddlist")
	initviews
End Sub
Sub initviews
	cblv.Initialize(Me,svcblv,"","cblv_Click","",1dip)
	ab.Initialize(pab,False,False,pab.Height,Me)
	ab.SetDividerWidth(1)
	ab.SameWidthForAll(True)
	ab.AddButton(Null,"全选",5,-1,"abclick","")
	ab.AddButton(Null,"删除",5,-1,"abclick","")
	ab.AddButton(Null,"添加",5,-1,"abclick","")
	ab.AddButton(Null,"编辑",5,-1,"abclick","")
	For i=0 To 9
		cblv.AddItem(i,False,"地址"&i,"",Null)
	Next
	cblv.ResizePanel
End Sub
Sub abclick(ab1 As ClsActionBar,v As View)
	Dim p As Panel=v
	Dim tv As Label
	For Each vv As View In p.GetAllViewsRecursive
		If GetType(vv).ToLowerCase.Contains("textview") Then
			tv=vv
			Log(tv.Text)
			ToastMessageShow(tv.Text&" clicked",False)
		End If
		'Log(GetType(vv))
	Next
	'Log("abclick "&btn.Text)
End Sub
Sub cblv_Click(p As Panel,ptag As Object)
	
End Sub
Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub addlv_ItemClick (Position As Int, Value As Object)
	
End Sub

Sub ivback_Click
	Activity.Finish
End Sub